1. Field of the Invention
The present invention relates to data storage format conversion method and a system for converting data stored in a variable length record format adopted in a magnetic disk system of a general-purpose computer into data of a fixed length format which is adopted in a commercially available miniature type magnetic disk device. The invention also relates to a data access method for making accessing the data which have undergone the format conversion and an apparatus for controlling the access to the data.
2. Description of the Related Art
Heretofore, as an external data storage device for a general-purpose (or universal-purpose) computer system, a fixed disk drive system of a variable length record format type (also known as the count key data type or CKD-type in abbreviation) was widely used. With the term "variable length record format type disk or CKD-type disk", it is intended to mean a magnetic disk which is formatted in such a manner that the length as well as the number of physical records to be recorded on one track of the magnetic disk is variable.
In general, in the magnetic disk of the variable length record format type, any given one of the tracks on the disk begins with an index mark, in succession to which there are provided firstly a home address (HA) area and then a record-zero (R0) area, as is shown in FIG. 33. The area HA R0 are dedicated for storing in addition to the address information such as a cylinder address and a head address for that track such information as the locations of magnetic defects on the track, defectiveness of the track as a whole and control information such as an address of a candidate track which is reserved for replacing the defective track. These areas HA and R0 have to necessarily be provided.
On the other hand, record areas R1 et seq. which are provided in succession to the areas HA and R0 are used for recording the ordinary data. These record areas can arbitrarily be formatted for use by a software running on a host computer so long as an overall amount of any given number of records of variable lengths can fall within the available recording capacity of the track. Each of the data record areas (R1) includes three fields. They are a count field (COUNT), a key field (KEY) and a data field (DATA). From the capitals "C", "K" and "D" of the names of these fields, this format is also referred to as the CKD-type format.
The count field (COUNT) has a fixed length and is adapted to store not only the address information such as the cylinder address (CC), head address (HA), record ID number (R), etc. but also such control information as a key field length (also referred to as KL in abbreviation), a data field length (DL), etc. of the relevant record for the purpose of allowing lengths of the succeeding key field and the data field to be arbitrarily altered or varied. The key field and the data field are destined for recording the intrinsic data of relevant record. However, unless the key field for recording the key of the associated record is required, it is also possible to create a record in which no key field is present. In that case, the key field length or KL may simply be set to zero (i.e., KL=0).
Provided between the record fields such as the fields HA, R0, R1, R2 and so forth are inter-record gaps G1, G2, and G3, each having an appropriate size, wherein there is recorded in each of the gaps (G3) which precede to the records R1, R2, etc., respectively, a specific magnetic mark termed "address mark (AM)" so that the beginning of a record of concern can be identified by detecting this address mark (AM), regardless of the location on the track where the read operation is started.
Furthermore, in each of the records, there are provided the inter-field gaps (G2) for the purpose of identifying discriminatively the individual fields within the record.
In contrast, in the case of an external data storage system for a computer system of a relatively small scale such as mini-computers, office computers, personal computers, work stations and the like, there is employed a fixed magnetic disk device of a fixed length record type (also known as the magnetic disk system of a fixed block architecture type or FBA-type in abbreviation). In case of the fixed length record type or FBA-type disk, one record (often referred to as the sector in the field of the FBA-type disk drive system) is ordinarily composed of an ID field for storing address information and a data field for storing intrinsic data, wherein the length of any field is fixedly or invariably determined previously. Consequently, the number of records (or the number of sectors) per track is also fixed, i.e., invariable.
Heretofore, the magnetic disk of the variable length record (CKD) type and that of the fixed length record (FBA) type have been used separately or distinctively in dependence on the computer systems for which the use of the magnetic disks mentioned above are destined. In general, the fixed length record type magnetic disk destined for use in the small scale computers has been limited not only in the storage capacity but also in the data transfer rate, the seek speed and other performances when compared with the variable length record (CKD) type magnetic disk. In recent years, however, there arises a great demand for implementation of the variable length record (CKD) type magnetic disk in a miniature size. On the other hand, remarkable progress has been made in implementation of the fixed length record (FBA) type magnetic disk having a large capacity while enjoying a high data transfer rate as well as a high seek speed. Under the circumstances, differences in the specifications between the CKD type disk and the FBA type disk become lessened more and more.
In respect to the manufacture efficiency on a mass-production basis and hence the cost as involved, the variable length record (CKD) type magnetic disk is inferior to the fixed length record type disk which can find extensive applications in various computers inclusive of the personal computers, the office computers and so forth, because the former is limited to the use only for the general-purpose computer systems. Under the circumstances, the fixed length record type magnetic disk is comparatively high in price, and thus the difference in the cost/performance ratio between the CKD type magnetic disk and the FBA type disk is increasing more and more. Consequently, there arises a strong demand for the availability of the less expensive fixed length record type magnetic disk of a high cost/performance ratio even in the general-purpose computer system.
In the CKD type fixed disk system, there has been adopted such a servo-plane servo system in which a servo plane (or surface) for recording servo control information to be used for positioning a magnetic head is provided separately from the data surface area destined for recording the data. With this system, the head positioning accuracy is determined in dependence on the accuracy of the mechanical or physical positions of the data areas and the servo information area. In an effort to avoid this inconvenience and to increase the track recording density, there has been proposed and developed for practical applications a data-area servo system in which the servo control information is written in the ID field of the data area. In the case where the data-area servo system is adopted, however, another problem is encountered that the head positioning accuracy is degraded when compared with the fixed length record type disk system where the servo information can be obtained at a constant interval without fail, because the availability of the servo information constantly at a predetermined time interval can not be ensured in the variable length record type disk system although the latter allows the recording of even a single record on a track in an extreme case.
At present, a so-called disk array technique attracts attention, according to which the data are recorded dispersely or distributively among a plurality of magnetic disks while providing a redundant disk for storing and managing the parity information and the like for the distributively stored data, to thereby enhance the performance and the reliability of the magnetic disk system as a whole, in view of the fact that limitation is unavoidably imposed on the attempt for improving the performance and the reliability on a disk-by-disk basis. However, difficulty is encountered in applying the disk array technique to the variable length record (CKD) type disk system in which the length and the number of the records are variable.
Besides, in the field of the general-purpose computer system where an enormous amount of software resources have been developed, it is very difficult to convert the variable length record format into the fixed length record format.
Under the circumstances, there has also been proposed such an access system which allows the access to the variable length (CKD) data recorded by the variable length record systems known heretofore. This accesses method will be described by reference to FIGS. 34 and 35. Referring first to FIG. 34 which illustrates schematically a magnetic disk system in which the servo-plane servo system described previously is adopted, it will be seen that a servo plane S and data areas D are provided, wherein the servo plane S is logically assigned with a plurality of sectors (which conceptually differ from the sector employed in the FBA-type disk system). FIG. 35 is a diagram for illustrating an array of the sectors. It is now assumed that one track has a storage capacity of 48 KB (kilobytes), the track is divided into a plurality of sectors each having a capacity or size of 244 bytes and that each sector is divided into seven segments S1 to S7 each of which has a size of 32 bytes. When data is recorded on a data plane D in the magnetic disk system of the configuration mentioned above, the value or the number identifying the sector in which the data has been recorded (this value is also referred to as the sector value) is stored so that the retrieval of the data can be performed with the aid of the sector value. In this case, retrieval of the data can be performed at a high speed. FIG. 36 is a flow chart showing, by way of example, an access sequence performed by a software running on a host computer when data is retrieved by using the sector value defined above. As can be seen in this figure, the software running on the host computer designates the sector in which data to be accessed is recorded by issuing a set sector command "SET SECTOR". In response to this set sector command, the magnetic disk system is disconnected from the host computer and the magnetic disk controller and then searches autonomously the designated sector. Upon finding of the designated sector, the magnetic disk system issues a connection request to the host computer via the magnetic disk controller, whereby the connection between the magnetic disk system and the host computer is reestablished. Subsequently, a search ID (identifier) command is issued by the software, whereby ID information of the data to be searched is sent to the magnetic disk system. The ID information includes, for example, a cylinder ID number, a track ID number and a record ID number of the record to be searched. Upon reception of this search ID command, the magnetic disk system compares the ID information as received with the ID of a record located at the start of the sector designated by the set sector command, the result of which comparison is then messaged to the host computer. Unless the comparison results in coincidence, return is made to the set sector command step from the command execution step through a succeeding transfer-in-channel (TIC) command step, whereupon the search ID command is again issued for a next or succeeding record. On the other hand, when the above-mentioned comparison results in coincidence, the host computer skips the succeeding transfer-in-channel command to issue finally a read command or a write command, whereby the read or write instruction is executed for the data as retrieved.
As is apparent from the above description, the software used in the general-purpose computers is prepared on the basis of the variable length record scheme, and thus an attempt for altering or modifying the software resources already developed will involve not a little difficulty. Such being the circumstances, there is proposed a technique which allows the magnetic disk of the variable length record type known heretofore to be used by a software running on a host computer by emulating the variable length record type scheme in the magnetic disk controller while using actually the fixed length record type disk.
An approach for the CKD-to-FBA format conversion is described in detail in Japanese Unexamined Patent Application Publication No. 30691/1989 (JP-A-1-30691) entitled "STORAGE CONTROL METHOD AND APPARATUS". Additionally, general discussion of the CKD-to-FBA format data conversion is found in an IBM publication "IBM4321/4331 PROCESSOR COMPATIBLE FUNCTION", GA33-1528, third edition, (September 1982). The CKD-to-FBA format conversion disclosed in these literatures will briefly be reviewed below.
According to the method described in the IBM publication, all the gaps are eliminated in order to compress the data or records upon conversion of data of the CKD format data to the FBA format data.
In the case of the conversion described in the IBM publication cited above, the set sector command described above in conjunction with FIG. 36 can not be used or supported. More specifically, when the set sector command is issued, no operation therefor is performed, but the record search is carried out in response to issuance of the search ID command. Although the record search can be accomplished with the aid of the search ID command only, it is noted that a lot of time is taken for finding out the record having the same ID as the one designated by the search ID command, by checking sequentially all the records, starting from the forefront or leading one in the track. Accordingly, the record search based on the search ID command is extremely disadvantages when compared with the search in which the set sector command designating the sector containing the record of concern is a prerequisite and in which the search is performed in response to the search ID command for the sectors which are located in succession to that designated by the sector set command, inclusive thereof.
On the other hand, in the case of the conversion scheme disclosed in the Unexamined Patent Application Publication mentioned above, it is proposed that
(1) the inter-field gaps (G2), ECC (abbreviation of Error Checking and Correcting) codes, padding data and physical parameters are eliminated, PA1 (2) the inter-record gaps (indicated by reference numerals 131, 133, 137, 163 in FIG. 37) are left or retained, PA1 (3) the inter-record gaps are stretched or extended correspondingly for filling or compensating for the interfield gaps as eliminated so as to maintain or retain the relative positions of the count fields in the individual records relative to or from the start of the record as they are (although the relative positions of the key fields and the data fields are deviated, the position of the record of concern can be determined so long as the relative position of the count field is known), PA1 (4) the track data is divided into FBA fixed blocks (sectors) with the position information (156 in FIG. 37) of the count field in the first record contained in each fixed block being added to each fixed block to thereby permit direct and random addressing to the CKD records stored in the FBA format type magnetic disk, and PA1 (5) a corresponding mark bit is recorded in the block including no count field. PA1 (1) only the inter-record gaps are left with other extra gaps being eliminated in order to maintain or retain the relative positions of the counter fields in the records, and PA1 (2) a header indicating the position of the first count field is affixed at the beginning of the FBA fixed block in which the counter field is record. PA1 (a) read/write means for reading data from and/or writing in the storage on a management unit basis, PA1 (b) a memory for storing the data read from and/or written by the read/write means on a management unit basis; PA1 (c) input means for inputting an access instruction to a variable length record stored in the variable length format, PA1 (d) position calculating means for estimating roughly a position of the management unit which is considered as including therein the variable length record to be accessed on the basis of the access instruction inputted through the input means, and PA1 (e) record search means for reading the management unit located at the position estimated by the position calculating means from the storage into the memory through the read/write means, to thereby search the record to be accessed and designated by the access instruction inputted through the input means. PA1 (a) a gap deletion step of deleting the inter-record gaps and the inter-field gaps from a variable length format including fields which contain data, the inter-record gaps and the inter-field gaps, to thereby interconnect the fields of the individual variable length records to one another, PA1 (b) a record arraying step of arraying the individual variable length records interconnected in the gap deleting step in a sequential order within the frame having a predetermined size and storing within the frame the access information for making access to the individual variable length records in correspondence with the variable length records, respectively, and PA1 (c) a fixed-length block storing step for storing the frame by dividing it into a plurality of blocks each of a fixed length for storing the same in a fixed length format. PA1 (a) an access command input step of inputting commands for accessing records of a variable length format and search information for searching a record to be accessed, PA1 (b) a position information estimating step of estimating position information of the frame in which the record to be accessed is stored, on the basis of the search information inputted in the access command input step, and PA1 (c) a record search step of regenerating from a plurality of fixed length blocks stored in the fixed length format the frame succeeding to the one having the position information as estimated in the position information estimating step, to thereby search the record to be accessed.
In brief, it is taught in the Publication that
With the arrangements described above, it is possible to address directly and in random the CKD records stored in the disk formatted in the FBA scheme.
However, the hitherto known techniques described above suffer various problems and shortcomings which will be mentioned below.
In the case of the technique described in the IBM publication, the CKD-to-FBA format conversion is executed while compressing the data or records by deleting all the gaps. However, because the set sector command can not be supported, a lot of time is required for making access to the record of concern.
On the other hand, in the case of the technique disclosed in JP-A-1-30691, according to which all the inter-record gaps are deleted, the inter-field gaps are however left or retained and extended by a length corresponding to the deleted inter-record gaps. Consequently, when a large number of records each of a small size or capacity is to be handled, the memory therefor is used wastefully.
Because there is available only the information concerning the position of the leading one of the CKD records included in each FBA fixed block, search of a CKD record other than the leading one requires repetitive execution of a procedure of reading first the count field of the leading or forefront CKD record, determining the length of the leading record on the basis of the key field length (KL) and the data field length (DL) in the count field, then reading the key field length (KL) and the data field length (DL) of the succeeding record, and subsequently searching the count field of the succeeding record. Consequently, not only a lot of time is involved in the processing but also the number of accesses made to the memory increases remarkably, in particular when the track images are concentratively managed in a disk cache memory, as a result of which the performance of the system as a whole is eventually degraded.
It should further be mentioned that in the course of data transfer through or with a channel, temporary interruption of the data transfer takes place frequently, incurring degradation of the data transfer efficiency because of presence of the position information of the CKD record in every small unit of the FBA block.